GetPictureFileHeader
TheGetPictureFileHeader
function extracts the picture frame (thepicFrame
rectangle in the picture structure) and file header from a specified picture file (PICT file). Your program can use this information to determine how to draw an image without having to read the picture file.
pascal OSErr GetPictureFileHeader (short refNum, Rect *frame, OpenCPicParams *header);
refNum
- Contains a file reference number for the source PICT file.
frame
- Contains a pointer to a rectangle that is to receive the picture frame rectangle of the picture file. This function places the
picFrame
rectangle from the picture structure into the rectangle referred to by theframe
parameter. If you are not interested in this information, passnil
in
this parameter.header
- Contains a pointer to an
OpenCPicture
parameters structure. TheGetPictureFileHeader
function places the header from the specified picture file into the structure referred to by theheader
parameter. Note that this function always returns a version 2 header. If the source file is a version 1 PICT file, theGetPictureFileHeader
function converts the header into version 2 format before returning it to your application. See Inside Macintosh: Imaging for more information about picture headers and theOpenCPicture
function. If you are not interested in this information, passnil
in this parameter.DESCRIPTION
TheGetPictureFileHeader
function always returns a version 2 PICT file header. If the specified picture file is a version 1 file, theGetPictureFileHeader
function synthesizes a version 2 header from the information available in the file header.RESULT CODES
File Manager errors
noErr 0 No error paramErr -50 Invalid parameter specified